package com.my.admin.service.impl;

import com.my.admin.entity.User;
import com.my.admin.mapper.UserMapper;
import com.my.admin.service.UserService;
import com.my.admin.util.ServiceImplCache;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;

import java.util.Set;

/**
 * @author my
 */
@Service
public class UserServiceImpl extends ServiceImplCache<UserMapper, User> implements UserService {

    @Override
    @Cacheable(value = "getRoleByUserName")
    public Set<String> getRoleByUserName(String username) {
        return baseMapper.getRoleByUserName(username);
    }

    @Override
    @Cacheable(value = "getMenuByUserName")
    public Set<String> getMenuByUserName(String username) {
        return baseMapper.getMenuByUserName(username);
    }
}
